package com.nytd.demo;

import org.springframework.web.bind.annotation.*;

@RequestMapping("/user")
@RestController
public class UserController {

    @RequestMapping(value = "/v1",method = {RequestMethod.GET,RequestMethod.POST})
    public String hello1() {
        return "hello spring boot1~";
    }

    @RequestMapping(value = "/v2",method = RequestMethod.PUT)
    public String hello2() {
        return "hello spring boot2~";
    }

    @GetMapping("/v2")
    public String hello3() {
        return "hello spring boot3~";
    }

    @PostMapping("/v2")
    public String hello4() {
        return "hello spring boot4~";
    }


}
